package com.ikun.hospayservice.feign;


import com.ikun.common.entity.Convention;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("hos-user-service")
public interface UserServiceFeignClient {

    /**
     * 插入订单
     *
     * @param convention
     * @return
     */
    @PostMapping("/user/makeOrder")
    ResponseEntity<Convention> makeOrder(@RequestBody Convention convention);

    /**
     * 修改订单状态
     *
     * @param convention
     * @return
     */
    @RequestMapping("/user/status")
    ResponseEntity<Convention> changeOrderStatus(@RequestBody Convention convention);

    /**
     * 查询订单
     *
     * @param tradeNo
     * @return
     */
    @RequestMapping("/user/tradeNo")
    ResponseEntity<Convention> getOrderByTradeNo(@RequestBody String tradeNo);
}
